<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>外边距</title>
</head>
<style>
    div {
        height: 300px;
        width: 300px;
        background-color: blue;
    }

    .a {
        margin-bottom: 20px;
    }
</style>

<body>
    <div class="a">1</div>
    <div class="b">2</div>
</body>

</html>